<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMessagesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('message', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();

			//关联tyw_users中的id
			$table->integer('uid');
			//varchar 255 消息标题
			$table->string('title');
			//text 消息内容
			$table->text('content');
			//tinyint 3 消息类型 0为系统通知 1为项目进度或状态通知
			$table->tinyInteger('type');

			$table->softDeletes();

		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('messages');
	}

}
